﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Evan.Model
{
    
    public class SysModel
    {
        /// <summary>
        /// 数据库类型
        /// </summary>
        public enum DateBaseType
        {
            /// <summary>
            /// 错误类型
            /// </summary>
            Error,
            /// <summary>
            /// MsSql类型
            /// </summary>
            MsSql,
            /// <summary>
            /// MySql类型
            /// </summary>
            MySql,
        }


        /// <summary>
        /// 单个ConnectionModel
        /// </summary>
        public class ConnectionModel
        {
            /// <summary>
            /// 
            /// </summary>
            public string Name { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Provider { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string ConnectionString { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string DataBase { get; set; }
        }

        /// <summary>
        /// 伪静态
        /// </summary>
        public class RewriteUrlModel
        {
            /// <summary>
            /// 
            /// </summary>
            public string reg { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string url { get; set; }
        }

        /// <summary>
        /// 系统配置 
        /// </summary>
        public class SystemConfig
        {
            /// <summary>
            /// 显示可视化编辑按钮
            /// </summary>
            public bool ShowVisualEditBtn { get; set; }
            /// <summary>
            /// 显示字段编辑按钮
            /// </summary>
            public bool ShowFieldEditBtn { get; set; }
            /// <summary>
            /// 管理目录
            /// </summary>
            public string ManagerPath { get; set; }
            /// <summary>
            /// 是否开发环境 localhost 和 kaola.ws
            /// </summary>
            public int Dev { get; set; }

        }


        /// <summary>
        /// 系统提示
        /// </summary>
        public class SystemNotice
        {
            /// <summary>
            /// 通知类型
            /// </summary>
            public string Type { get; set; }
            /// <summary>
            /// 标题
            /// </summary>
            public string Title { get; set; }
            /// <summary>
            /// 等级 1-3 1=danger  2=info 3=default
            /// </summary>
            public int Level { get; set; }
            /// <summary>
            /// 动作类型 link js 
            /// </summary>
            public string ActionType { get; set; }

            /// <summary>
            /// 具体动作 可以是js 可以是链接
            /// </summary>
            public string Action { get; set; }
        }


        /// <summary>
        /// Email Model
        /// </summary>
        public class EmailModel
        {
            /// <summary>
            /// 发信人地址
            /// </summary>
            public string FromUser { get; set; }
            /// <summary>
            /// 收信人地址 , 多个地址使用 ','(英文逗号) 分开
            /// </summary>
            public string ToUser { get; set; }
            /// <summary>
            /// 抄送 , 多个地址使用 ','(英文逗号) 分开
            /// </summary>
            public string CcUser { get; set; }
            /// <summary>
            /// 邮件标题
            /// </summary>
            public string Subject { get; set; }
            /// <summary>
            /// 邮件正文
            /// </summary>
            public string Body { get; set; }
            /// <summary>
            /// Stmp地址
            /// </summary>
            public string StmpServer { get; set; }
            /// <summary>
            /// 用户昵称
            /// </summary>
            public string UserNick { get; set; }
            /// <summary>
            /// 用户邮箱地址 发件箱账号
            /// </summary>
            public string UserEmail { get; set; }
            /// <summary>
            /// 用户邮箱密码 发件箱密码
            /// </summary>
            public string UserPwd { get; set; }
            /// <summary>
            /// 是否HTML格式
            /// </summary>
            public bool IsHtml { get; set; }
            /// <summary>
            /// 附件地址 多个地址用英文逗号分开
            /// </summary>
            public string FilePath { get; set; }
            /// <summary>
            /// 是否SSL
            /// </summary>
            public bool IsSSL { get; set; }
            /// <summary>
            /// 端口号 一般是 25
            ///  SSL 是 465 或 587
            /// </summary>
            public int Port { get; set; }
        }


        #region 文件管理
        /// <summary>
        /// 文件
        /// </summary>
        public class FileModel
        {
            /// <summary>
            /// 文件名称
            /// </summary>
            public string Name { get; set; }
            /// <summary>
            /// 全路径
            /// </summary>
            public string FullPath { get; set; }
            /// <summary>
            /// 当前文件所在目录
            /// </summary>
            public string CurPath { get; set; }
            /// <summary>
            /// 文件类型
            /// </summary>
            public string Type { get; set; }
            /// <summary>
            /// 文件后缀
            /// </summary>
            public string Suffix { get; set; }
            /// <summary>
            /// 文件大小
            /// </summary>
            public long Size { get; set; }
            /// <summary>
            /// 文件添加时间
            /// </summary>
            public DateTime AddTime { get; set; }
            /// <summary>
            /// 文件修改时间
            /// </summary>
            public DateTime EditTime { get; set; }
        }
        #endregion

        /// <summary>
        /// 栏目列表的实体类
        /// </summary>
        public class ChannelModel
        {
            /// <summary>
            /// 
            /// </summary>
            public int Id { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int ParentId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Title { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string SubTitle { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string EnTitle { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int Deep { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string SubClass { get; set; }
            /// <summary>
            /// 管理页面
            /// </summary>
            public string ManagePageUrl { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string ImgUrl { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string SubImgUrl { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Content { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string SubContent { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string SeoTitle { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string SeoKeyWords { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string SeoDescription { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string WebPath { get; set; }
            //public string SkinName { get; set; }
            //public string RewriteName { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int SortId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int PageType { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int IsIndexNav { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int IsChannelNav { get; set; }

        }

        /// <summary>
        /// 站点配置实体类 --暂时无用
        /// </summary>
        [Serializable]
        public class siteconfig
        {
            /// <summary>
            /// 
            /// </summary>
            public siteconfig()
            { }

            private string _webname = "";
            private string _weburl = "";
            private string _webcompany = "";
            private string _webaddress = "";
            private string _webtel = "";
            private string _webfax = "";
            private string _webmail = "";
            private string _webcrod = "";

            private string _webpath = "";
            private string _webmanagepath = "";
            private int _staticstatus = 0;
            private string _staticextension = "";
            private int _memberstatus = 1;
            private int _commentstatus = 0;
            private int _logstatus = 0;
            private int _webstatus = 1;
            private string _webclosereason = "";
            private string _webcountcode = "";

            private string _smsapiurl = "";
            private string _smsusername = "";
            private string _smspassword = "";

            private string _emailsmtp = "";
            private int _emailssl = 0;
            private int _emailport = 25;
            private string _emailfrom = "";
            private string _emailusername = "";
            private string _emailpassword = "";
            private string _emailnickname = "";

            private string _filepath = "";
            private int _filesave = 1;
            private string _fileextension = "";
            private string _videoextension = "";
            private int _attachsize = 0;
            private int _videosize = 0;
            private int _imgsize = 0;
            private int _imgmaxheight = 0;
            private int _imgmaxwidth = 0;
            private int _thumbnailheight = 0;
            private int _thumbnailwidth = 0;
            private int _watermarktype = 0;
            private int _watermarkposition = 9;
            private int _watermarkimgquality = 80;
            private string _watermarkpic = "";
            private int _watermarktransparency = 10;
            private string _watermarktext = "";
            private string _watermarkfont = "";
            private int _watermarkfontsize = 12;

            private string _sysdatabaseprefix = "smf_";
            private string _sysencryptstring = "Smarta";

            #region 主站基本信息==================================
            /// <summary>
            /// 网站名称
            /// </summary>
            public string webname
            {
                get { return _webname; }
                set { _webname = value; }
            }
            /// <summary>
            /// 网站域名
            /// </summary>
            public string weburl
            {
                get { return _weburl; }
                set { _weburl = value; }
            }
            /// <summary>
            /// 公司名称
            /// </summary>
            public string webcompany
            {
                get { return _webcompany; }
                set { _webcompany = value; }
            }
            /// <summary>
            /// 通讯地址
            /// </summary>
            public string webaddress
            {
                get { return _webaddress; }
                set { _webaddress = value; }
            }
            /// <summary>
            /// 联系电话
            /// </summary>
            public string webtel
            {
                get { return _webtel; }
                set { _webtel = value; }
            }
            /// <summary>
            /// 传真号码
            /// </summary>
            public string webfax
            {
                get { return _webfax; }
                set { _webfax = value; }
            }
            /// <summary>
            /// 管理员邮箱
            /// </summary>
            public string webmail
            {
                get { return _webmail; }
                set { _webmail = value; }
            }
            /// <summary>
            /// 网站备案号
            /// </summary>
            public string webcrod
            {
                get { return _webcrod; }
                set { _webcrod = value; }
            }
            #endregion

            #region 功能权限设置==================================
            /// <summary>
            /// 网站安装目录
            /// </summary>
            public string webpath
            {
                get { return _webpath; }
                set { _webpath = value; }
            }
            /// <summary>
            /// 网站管理目录
            /// </summary>
            public string webmanagepath
            {
                get { return _webmanagepath; }
                set { _webmanagepath = value; }
            }
            /// <summary>
            /// 是否开启生成静态
            /// </summary>
            public int staticstatus
            {
                get { return _staticstatus; }
                set { _staticstatus = value; }
            }
            /// <summary>
            /// 生成静态扩展名
            /// </summary>
            public string staticextension
            {
                get { return _staticextension; }
                set { _staticextension = value; }
            }
            /// <summary>
            /// 开启会员功能
            /// </summary>
            public int memberstatus
            {
                get { return _memberstatus; }
                set { _memberstatus = value; }
            }
            /// <summary>
            /// 开启评论审核
            /// </summary>
            public int commentstatus
            {
                get { return _commentstatus; }
                set { _commentstatus = value; }
            }
            /// <summary>
            /// 后台管理日志
            /// </summary>
            public int logstatus
            {
                get { return _logstatus; }
                set { _logstatus = value; }
            }
            /// <summary>
            /// 是否关闭网站
            /// </summary>
            public int webstatus
            {
                get { return _webstatus; }
                set { _webstatus = value; }
            }
            /// <summary>
            /// 关闭原因描述
            /// </summary>
            public string webclosereason
            {
                get { return _webclosereason; }
                set { _webclosereason = value; }
            }
            /// <summary>
            /// 网站统计代码
            /// </summary>
            public string webcountcode
            {
                get { return _webcountcode; }
                set { _webcountcode = value; }
            }
            #endregion

            #region 短信平台设置==================================
            /// <summary>
            /// 短信API地址
            /// </summary>
            public string smsapiurl
            {
                get { return _smsapiurl; }
                set { _smsapiurl = value; }
            }
            /// <summary>
            /// 短信平台登录账户名
            /// </summary>
            public string smsusername
            {
                get { return _smsusername; }
                set { _smsusername = value; }
            }
            /// <summary>
            /// 短信平台登录密码
            /// </summary>
            public string smspassword
            {
                get { return _smspassword; }
                set { _smspassword = value; }
            }
            #endregion

            #region 邮件发送设置==================================
            /// <summary>
            /// STMP服务器
            /// </summary>
            public string emailsmtp
            {
                get { return _emailsmtp; }
                set { _emailsmtp = value; }
            }
            /// <summary>
            /// 是否启用SSL加密连接
            /// </summary>
            public int emailssl
            {
                get { return _emailssl; }
                set { _emailssl = value; }
            }
            /// <summary>
            /// SMTP端口
            /// </summary>
            public int emailport
            {
                get { return _emailport; }
                set { _emailport = value; }
            }
            /// <summary>
            /// 发件人地址
            /// </summary>
            public string emailfrom
            {
                get { return _emailfrom; }
                set { _emailfrom = value; }
            }
            /// <summary>
            /// 邮箱账号
            /// </summary>
            public string emailusername
            {
                get { return _emailusername; }
                set { _emailusername = value; }
            }
            /// <summary>
            /// 邮箱密码
            /// </summary>
            public string emailpassword
            {
                get { return _emailpassword; }
                set { _emailpassword = value; }
            }
            /// <summary>
            /// 发件人昵称
            /// </summary>
            public string emailnickname
            {
                get { return _emailnickname; }
                set { _emailnickname = value; }
            }
            #endregion

            #region 文件上传设置==================================
            /// <summary>
            /// 附件上传目录
            /// </summary>
            public string filepath
            {
                get { return _filepath; }
                set { _filepath = value; }
            }
            /// <summary>
            /// 附件保存方式
            /// </summary>
            public int filesave
            {
                get { return _filesave; }
                set { _filesave = value; }
            }
            /// <summary>
            /// 附件上传类型
            /// </summary>
            public string fileextension
            {
                get { return _fileextension; }
                set { _fileextension = value; }
            }
            /// <summary>
            /// 视频上传类型
            /// </summary>
            public string videoextension
            {
                get { return _videoextension; }
                set { _videoextension = value; }
            }
            /// <summary>
            /// 文件上传大小
            /// </summary>
            public int attachsize
            {
                get { return _attachsize; }
                set { _attachsize = value; }
            }
            /// <summary>
            /// 视频上传大小
            /// </summary>
            public int videosize
            {
                get { return _videosize; }
                set { _videosize = value; }
            }
            /// <summary>
            /// 图片上传大小
            /// </summary>
            public int imgsize
            {
                get { return _imgsize; }
                set { _imgsize = value; }
            }
            /// <summary>
            /// 图片最大高度(像素)
            /// </summary>
            public int imgmaxheight
            {
                get { return _imgmaxheight; }
                set { _imgmaxheight = value; }
            }
            /// <summary>
            /// 图片最大宽度(像素)
            /// </summary>
            public int imgmaxwidth
            {
                get { return _imgmaxwidth; }
                set { _imgmaxwidth = value; }
            }
            /// <summary>
            /// 生成缩略图高度(像素)
            /// </summary>
            public int thumbnailheight
            {
                get { return _thumbnailheight; }
                set { _thumbnailheight = value; }
            }
            /// <summary>
            /// 生成缩略图宽度(像素)
            /// </summary>
            public int thumbnailwidth
            {
                get { return _thumbnailwidth; }
                set { _thumbnailwidth = value; }
            }
            /// <summary>
            /// 图片水印类型
            /// </summary>
            public int watermarktype
            {
                get { return _watermarktype; }
                set { _watermarktype = value; }
            }
            /// <summary>
            /// 图片水印位置
            /// </summary>
            public int watermarkposition
            {
                get { return _watermarkposition; }
                set { _watermarkposition = value; }
            }
            /// <summary>
            /// 图片生成质量
            /// </summary>
            public int watermarkimgquality
            {
                get { return _watermarkimgquality; }
                set { _watermarkimgquality = value; }
            }
            /// <summary>
            /// 图片水印文件
            /// </summary>
            public string watermarkpic
            {
                get { return _watermarkpic; }
                set { _watermarkpic = value; }
            }
            /// <summary>
            /// 水印透明度
            /// </summary>
            public int watermarktransparency
            {
                get { return _watermarktransparency; }
                set { _watermarktransparency = value; }
            }
            /// <summary>
            /// 水印文字
            /// </summary>
            public string watermarktext
            {
                get { return _watermarktext; }
                set { _watermarktext = value; }
            }
            /// <summary>
            /// 文字字体
            /// </summary>
            public string watermarkfont
            {
                get { return _watermarkfont; }
                set { _watermarkfont = value; }
            }
            /// <summary>
            /// 文字大小(像素)
            /// </summary>
            public int watermarkfontsize
            {
                get { return _watermarkfontsize; }
                set { _watermarkfontsize = value; }
            }
            #endregion

            #region 安装初始化设置================================
            /// <summary>
            /// 数据库表前缀
            /// </summary>
            public string sysdatabaseprefix
            {
                get { return _sysdatabaseprefix; }
                set { _sysdatabaseprefix = value; }
            }
            /// <summary>
            /// 加密字符串
            /// </summary>
            public string sysencryptstring
            {
                get { return _sysencryptstring; }
                set { _sysencryptstring = value; }
            }
            #endregion
        }


        /// <summary>
        /// Page类型返回的数据
        /// </summary>
        public class PageModel
        {
            /// <summary>
            /// 总页数
            /// </summary>
            public int PageCount { get; set; }
            /// <summary>
            /// 当前第几页 从1开始计算
            /// </summary>
            public int CurPage { get; set; }
            /// <summary>
            /// 当前页大小
            /// </summary>
            public int PageSize { get; set; }
            /// <summary>
            /// 返回的动态Model
            /// </summary>
            public List<dynamic> Item = new List<dynamic>();
        }


        /// <summary>
        /// Page类型返回的数据 加入了总共多少条数据
        /// </summary>
        public class PageModels
        {
            /// <summary>
            /// 总共多少条数据
            /// </summary>
            public int AllCount { get; set; }
            /// <summary>
            /// 总页数
            /// </summary>
            public int PageCount { get; set; }
            /// <summary>
            /// 当前第几页 从1开始计算
            /// </summary>
            public int CurPage { get; set; }
            /// <summary>
            /// 当前页大小
            /// </summary>
            public int PageSize { get; set; }
            /// <summary>
            /// 返回的动态Model
            /// </summary>
            public List<dynamic> Item = new List<dynamic>();
        }


        /// <summary>
        /// htmlhelper输出参数 每个输出
        /// </summary>
        public class HtmlHelperModel
        {
            /// <summary>
            /// 元素ID
            /// </summary>
            public string Id { get; set; }
            /// <summary>
            /// 标题
            /// </summary>
            public string Title { get; set; }
            /// <summary>
            /// 数据库字段名称
            /// </summary>
            public string FieldName { get; set; }
            /// <summary>
            /// 字段约束
            /// 不为空 notnull , 时间 time , 邮箱 email , 数字 number , 手机号 tel , 座机号 phone , 汉字 chinese , 网址 url , 
            /// 多个同时满足为,分割   
            /// </summary>
            public string FieldVerify { get; set; }
            /// <summary>
            /// placeholder
            /// </summary>
            public string PlaceHoder { get; set; }
            /// <summary>
            /// 下面的提示信息
            /// </summary>
            public string Notice { get; set; }
            /// <summary>
            /// 最大大小 一般都是文本框以及文本域使用
            /// </summary>
            private int _maxlength = 0;
            /// <summary>
            /// 最大输入大小
            /// </summary>
            public int MaxLength
            {
                get { return _maxlength; }
                set { _maxlength = value; }
            }
            /// <summary>
            /// 默认值
            /// </summary>
            private string _defaultvalue = "";
            /// <summary>
            /// 默认值
            /// </summary>
            public string DefaultValue
            {
                get { return _defaultvalue; }
                set { _defaultvalue = value; }
            }

            /// <summary>
            /// 是否隐藏 hide  true=隐藏  
            /// </summary>
            private bool _hide = false;
            /// <summary>
            /// 是否隐藏 true=隐藏  
            /// </summary>
            public bool Hide
            {
                get { return _hide; }
                set { _hide = value; }
            }

            /// <summary>
            /// 字段类型枚举
            /// <para>文本框 input</para>
            /// <para>密码框 password</para>
            /// <para>可见密码框 password_eye</para>
            /// <para>文本域 textarea</para>
            /// <para>编辑器 editor</para>
            /// <para>单选 radio</para>
            /// <para>多选 checkbox</para>
            /// <para>下拉列表 select</para>
            /// <para>下拉多选列表 multipleselect</para>
            /// <para>文件上传 fileupload</para>
            /// <para>图片上传 imgupload</para>
            /// <para>多图上传 multipleimgupload</para>
            /// <para>时间选择器 time</para>
            /// <para>开关switch</para>
            /// <para>字段列表 list</para>
            /// <para>预 - Markdown编辑器 markdown</para>
            /// <para>预 - 省市 markdown</para>
            /// <para>预 - 省市区 markdown</para>
            /// <para>预 - 省市区县 markdown</para>
            /// </summary>
            public string FieldType { get; set; }

            /// <summary>
            /// 选择的项目 key value 的形式  key为选择的值 value 为显示的值
            /// 一般多选单选 下拉会用到
            /// </summary>
            public Dictionary<string, string> SelectItem { get; set; }
            /// <summary>
            /// 样式表 , style 属性
            /// 不用写style标签 , 只用写 color:red;border:none
            /// </summary>
            public string StyleCss { get; set; }
            /// <summary>
            /// class中的样式名称
            /// </summary>
            public string ClassName { get; set; }

        }

        /// <summary>
        /// 站点全局配置
        /// </summary>
        public class GlobalConfigModel
        {
            private bool _dev = false;
            private bool _isshowindex = false;
            private bool _ismodulesystem = false;
            private bool _hasverify = false;
            private string _securitylevel = "normal";
            /// <summary>
            /// 开发者模式
            /// </summary>
            public bool Dev
            {
                set { _dev = value; }
                get { return _dev; }
            }
            /// <summary>
            /// 是否在导航上显示首页
            /// </summary>
            public bool IsShowIndex
            {
                set { _isshowindex = value; }
                get { return _isshowindex; }
            }
            /// <summary>
            /// 是否模块系统
            /// </summary>
            public bool IsModuleSystem
            {
                set { _ismodulesystem = value; }
                get { return _ismodulesystem; }
            }
            /// <summary>
            /// 内容是否包含审核
            /// </summary>
            public bool HasVerify
            {
                set { _hasverify = value; }
                get { return _hasverify; }
            }
            /// <summary>
            /// normal 正常模式  height 高    best 最高 
            /// </summary>
            public string SecurityLevel
            {
                set { _securitylevel = value; }
                get { return _securitylevel; }
            }
        }


        /// <summary>
        /// 字段的参数
        /// </summary>
        public class FieldModel
        {
            /// <summary>
            /// 表名称
            /// </summary>
            public string TableName { get; set; }
            /// <summary>
            /// 字段名称
            /// </summary>
            public string FieldName { get; set; }
            /// <summary>
            /// 字段类型 [int,nvarchar,datetime]
            /// </summary>
            public string FieldType { get; set; }

            private int _fieldlength = 0;
            /// <summary>
            /// 字段大小 默认0不限制大小
            /// </summary>
            public int FieldLength
            {
                get { return _fieldlength; }
                set { _fieldlength = value; }
            }


            private bool _notnull = false;
            /// <summary>
            /// 是否为空 默认可为空
            /// </summary>
            public bool NotNull
            {
                get { return _notnull; }
                set { _notnull = value; }
            }

            /// <summary>
            /// 默认值 如果为空 , 建议留空 让系统自行处理 则=["",0,Default GetDate()]  
            /// </summary>
            public string FieldDefault { get; set; }

        }

        /// <summary>
        /// 相册的Model
        /// </summary>
        public class PhotoModel
        {
            /// <summary>
            /// 图片路径
            /// </summary>
            public string ImgUrl { get; set; }
            /// <summary>
            /// 缩略图路径
            /// </summary>
            public string Thumbnail { get; set; }
            /// <summary>
            /// 标题
            /// </summary>
            public string Title { get; set; }
            /// <summary>
            /// 说明
            /// </summary>
            public string Desc { get; set; }
        }



        #region 模板用到的字段Model
        /// <summary>
        /// 模板用到的字段
        /// </summary>
        public class TemplateFieldModel
        {
            /// <summary>
            /// 
            /// </summary>
            public string Title { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FieldName { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FieldType { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FieldSize { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FieldVerify { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string PlaceHoder { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Notice { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Content { get; set; }
        }
        #endregion

        #region 系统日志
        /// <summary>
        /// 系统日志
        /// </summary>
        public class SystemLog
        {
            /// <summary>
            /// 
            /// </summary>
            public int Id { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int UserId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string UserName { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public DateTime AddTime { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string UserIP { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string IPAddress { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Title { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Content { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Ver { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int IsOpeart { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int States { get; set; }
        }

        /// <summary>
        /// 内存中存储的日志
        /// </summary>
        public class MemLog
        {
            /// <summary>
            /// 
            /// </summary>
            public string Title { get; set; }

            private DateTime _time = DateTime.Now;
            /// <summary>
            /// 
            /// </summary>
            public DateTime Time
            {
                set { _time = value; }
                get { return _time; }
            }
            /// <summary>
            /// 
            /// </summary>
            public string Cont { get; set; }
        }

        #endregion

        #region 系统统计
        /// <summary>
        /// 系统统计
        /// </summary>
        public class Statistic
        {
            /// <summary>
            /// 
            /// </summary>
            public int Id { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int UserId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string UserName { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public DateTime AddTime { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string UserIP { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string IPAddress { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Title { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Content { get; set; }

            /// <summary>
            /// 
            /// </summary>
            public int UserBrowser { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string UserBrowserVer { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int BrowserType { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string UserDevice { get; set; }

            /// <summary>
            /// 
            /// </summary>
            public string PageTitle { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string PageUrl { get; set; }
            /// <summary>
            /// 搜索引擎来路
            /// </summary>
            public int SearchEngine { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Ver { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int States { get; set; }
        }

        /// <summary>
        /// 
        /// </summary>
        public enum UserBrowser
        {
            /// <summary>
            /// 
            /// </summary>
            未知 = 0,
            /// <summary>
            /// 
            /// </summary>
            Chrome = 1,
            /// <summary>
            /// 
            /// </summary>
            Safari = 2,
            /// <summary>
            /// 
            /// </summary>
            QQBrowser = 3,
            /// <summary>
            /// 
            /// </summary>
            Browser360 = 4,
            /// <summary>
            /// 
            /// </summary>
            Firefox = 5,
            /// <summary>
            /// 
            /// </summary>
            Opera = 6,
            /// <summary>
            /// 
            /// </summary>
            SouGou = 7
        }
        #endregion



        #region 网站所有URL地址


        #endregion

        #region 字段中多选的配置
        /// <summary>
        /// 字段中设置的多选配置
        /// 无论是单个栏目还是多个栏目需要绑定的话 , 都需要写成JSON数组的形式
        /// <para>单个栏目 eg : [{"Content":"1,2,3","SelectField":"Id,Title","BindMode":"all","Deep":"0","BindType":"channel"}]</para>
        /// <para>多个栏目 eg : [{"Content":"1,2,3","SelectField":"Id,Title","BindMode":"all","Deep":"0","BindType":"channel"},{"Content":"1,2,3","SelectField":"Id,Title","BindMode":"all","Deep":"0","BindType":"channel"}]</para>
        /// </summary>
        public class SelectConfigModel
        {
            /// <summary>
            /// 这里是要取的栏目ID
            /// <para>如果是取顶级栏目 则填写顶级栏目Id</para>
            /// <para>如果是取某一个子栏目 则填写子栏目Id</para>
            /// </summary>
            public int Channel { get; set; }
            /// <summary>
            /// 内容值设置 , 如果不规定 , 可以留空 留空后 BindMode会自动转为all
            /// <para>内容值的设置不能与Channel一致 , 否则会出错</para>
            /// <para>假如是要取某个栏目下面的所有数据 则可以留空 , 换言之 BindMode=all 的时候不读取这里的数据</para>
            /// <para>如果是栏目Id 就写Id 如有多个用逗号隔开  eg: 1,2,3</para>
            /// <para>如果是栏目类型 类型Id 如有多个用逗号隔开  eg: 1,2,3</para>
            /// </summary>
            public string Content { get; set; }
            /// <summary>
            /// 设置选择的字段 如果BindType=channel 强制读取Id,Title
            /// <para>默认 Id,Title  两个参数逗号隔开 第一个为选择值 第二个为显示值</para>
            /// </summary>
            public string SelectField { get; set; }
            /// <summary>
            /// 绑定模式  针对Content字段设置的值读取 , 也就是说只针对栏目规则生效 , 无论最终要显示的是栏目数据还是内容数据 , 这里的筛选只针对上层取值(栏目筛选)
            /// <para>需要注意的是 , 务必保证取内容数据的时候在一张表中取 , 否则会报错</para>
            /// <para>留空等同于 all</para>
            /// <para>all 全部加载 , 自动忽略Content属性</para>
            /// <para>id-in 包含Id</para>
            /// <para>id-out 排除Id </para>
            /// <para>type-in 包含类型</para>
            /// <para>type-out 排除类型 此项作废 <para>此项会导致从多个表取内容</para></para>
            /// </summary>
            public string BindMode { get; set; }
            /// <summary>
            /// 搜索深度
            /// <para>0为递归所有栏目</para>
            /// <para>大于0为设置查找几级</para>
            /// </summary>
            public int Deep { get; set; }
            /// <summary>
            /// 绑定的类型 , 规定是绑定栏目还是绑定数据
            /// <para>channel 是栏目</para>
            /// <para>content 是内容</para>
            /// </summary>
            public string BindType { get; set; }
        }
        #endregion


        #region Feditor中的文件配置
        /// <summary>
        /// Feditor中的文件配置
        /// </summary>
        public class FEditorImageInfo
        {
            /// <summary>
            /// 
            /// </summary>
            public string url { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string thumb { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string tag { get; set; } = "";
            /// <summary>
            /// 
            /// </summary>
            public string name { get; set; } = "";
            /// <summary>
            /// 
            /// </summary>
            public string id { get; set; } = "";
        }
        #endregion

        #region 通用上传返回的model
        /// <summary>
        /// 通用上传返回的model
        /// </summary>
        public class UploadResult
        {
            /// <summary>
            /// 
            /// </summary>
            public string link { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string state { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string msg { get; set; }
        }
        #endregion 

    }
}
